home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / kolekcje / stanislaw_weslawski / garshnee / lotsablankers / install lotsablankers next >
Text File  |  1997-05-20  |  9KB  |  217 lines

  1. ;**********************************
  2. ;
  3. ;   Installer for LotsaBlankers
  4. ;       v0.07
  5. ;
  6. ;**********************************
  7.  
  8. ;************
  9. ; PROCEDURES
  10. ;************
  11.  
  12. (procedure P_USERQUESTIONS
  13. (select @user-level
  14.     ( ; NOVICE-mode
  15.         (set @default-dest "Work:")
  16.     )
  17.     ( ; ADVANCED-mode
  18.         (set @default-dest (askdir (disk)
  19.             (prompt ("Where do you want to install %s\n" @app-name)
  20.                   "It should be installed where your other Garshneblanker-modules are.")
  21.             (help ("You should select where you want to install %s. This should be the directory where your other GarshneBlanker modules are located.\n\n" @app-name)
  22.                   ("No directory will be created.\n\n" @app-name)
  23.                   @askdir-help)
  24.             (default @default-dest)
  25.             )
  26.         )
  27.         (set #docicon 1)
  28.         (set #docdir (askdir (disk)
  29.             (prompt "Where do you want to install the documentation?\nNo drawer will be created.")
  30.             (help   "You should select where you would like to install the documentation.\n"
  31.                     "It is a file called LotsaBlankers.guide, that contains necessary information for using the blankers, as well as information on our other products.\n\n"
  32.                     @askdir-help)
  33.             (default #docdir))
  34.         )
  35.         (if (askbool
  36.                 (prompt "Would you like to copy the Garshnelib.library replacement with better AGA support.\n\nIf your original version is newer than the one replaced with this, it won't be overwritten. Older ones will be overwritten.")
  37.                 (help   "This is a replacement for Garshnelib.library, with a little better AGA support - namely that the function copying the frontmost screen supports AGA now.\n\nIf you have an AGA screen you would want to copy this one!")
  38.                 (default 1)
  39.             )
  40.             (set #libdir "LIBS:")
  41.             (set #libdir 0)
  42.         )
  43.         (set #nofpu (database "fpu" "NOFPU"))
  44.  
  45.     )
  46.     ( ; EXPERT-mode
  47.         (set @default-dest (askdir (disk)
  48.             (prompt ("Where do you want to install %s\n" @app-name)
  49.                   "It should be installed where your other Garshneblanker-modules are.")
  50.             (help ("You should select where you want to install %s. This should be the directory where your other GarshneBlanker modules are located.\n\n" @app-name)
  51.                   ("No directory will be created.\n\n" @app-name)
  52.                   @askdir-help)
  53.             (default @default-dest)
  54.             )
  55.         )
  56.         (if (askbool
  57.                 (prompt "Would you like to install the documentation?")
  58.                 (help   "The documentation contains much useful information on the usage of LotsaBlankers, as well as information on our other products.\n\nNormally you would want to install the documentation.")
  59.                 (default 1)
  60.             )
  61.             (
  62.                 (set #docdir
  63.                     (askdir (disk)
  64.                         (prompt "Where do you want to install the documentation?\nNo drawer will be created.")
  65.                         (help   "You should select where you would like to install the documentation.\n"
  66.                                 "It is a file called LotsaBlankers.guide, that contains necessary information for using the blankers, as well as information on our other products.\n\n")
  67.                         (default #docdir)
  68.                     )
  69.                 )
  70.                 (set #docicon
  71.                     (askbool
  72.                         (prompt "Would you like to install the icon for the documentation?")
  73.                         (help   "Would you?")
  74.                         (default 1)
  75.                     )
  76.                 )
  77.             )
  78.             (set #docdir 0)
  79.         )
  80.         (if (askbool
  81.                 (prompt "Would you like to copy the Garshnelib.library replacement with better AGA support.\n\nIf your original version is newer than the one replaced with this, it won't be overwritten. Older ones will be overwritten.")
  82.                 (help   "This is a replacement for Garshnelib.library, with a little better AGA support - namely that the function copying the frontmost screen supports AGA now.\n\nIf you have an AGA screen you would want to copy this one!")
  83.                 (default 1)
  84.             )
  85.             (set #libdir
  86.                 (askdir
  87.                     (prompt "Where do you want to install the Garshnelib.library replacement?\nNormally this is LIBS:")
  88.                     (help   @askdir-help)
  89.                     (default #libdir)
  90.                 )
  91.             )
  92.             (set #libdir 0)
  93.         )
  94.         (set #nofpu
  95.             (askbool
  96.                 (prompt "There is an FPU and a non-FPU version available of LotsaDistortion.\n\nWhich one should be copied?")
  97.                 (help   "The FPU is a special processor unit that calculates floating point numbers (decimal numbers) faster than a normal non-FPU processor."
  98.                         "The Amiga's FPU is either an MC68881 or MC68882, if you have one of these, you have an FPU.\n\n"
  99.                         "The non-FPU version works on all computers, and you should select it if you are in doubt.\n\n"
  100.                         "68040 processors have a built-in FPU.")
  101.                 (choices "Non-FPU" "FPU")
  102.                 (default 1)
  103.             )
  104.         )
  105.     )
  106. )
  107. (if (> #docdir 0)
  108.     (if (> #docicon 0)
  109.         (set #info ("The documentation will be copied to \"%s\", along with its icon." #docdir))
  110.         (set #info ("The documentation will be copied to \"%s\". No icon will be copied for it." #docdir))
  111.     )
  112.     (set #info "No documentation will be copied")
  113. )
  114. (if (> #libdir 0)
  115.     (set #libinfo ("\n\nThe Garshnelib.library replacement will be copied to \"%s\"" #libdir))
  116.     (set #libinfo "\n\nThe Garshnelib.library replacement won't be copied.")
  117. )
  118. (if (> #nofpu 0)
  119.     (set #fpu "\nThe non-FPU version of LotsaDistortion will be copied.")
  120.     (set #fpu "\nThe FPU version of LotsaDistortion will be copied.")
  121. )
  122.  
  123. (if (> @user-level 0)
  124.     (askbool
  125.         (prompt "These actions will now be performed:\n\n\n"
  126.             ("The executable will be copied to:\"%s\"\n\n" @default-dest)
  127.             #info
  128.             #libinfo
  129.             #fpu
  130.             "\n\n\nShall I proceed?"
  131.         )
  132.         (help   "You are presented with the choices you made in earlier questions, if you are satisfied with them, click on \"Yes\", and the installation will continue.\n\n"
  133.                 "If you wish to alter your choices, click on \"No\"\n\n")
  134.         (default 1)
  135.         (choices "Go ahead" "Alter choices")
  136.     )
  137. (askbool (prompt "Do not run the installer in NOVICE mode!") (help "Sorry if you ever get this requester") (default 1)))
  138. )
  139.  
  140. ;********
  141. ;  MAIN
  142. ;********
  143.  
  144. (if (< (/ (getversion) 65536) 37) (abort ("%s requires at least AmigaOS v2.0." @app-name)))
  145.  
  146. ;  Choose where&what to install
  147. ; =============================
  148.  
  149. (set @default-dest "Work:" #docdir @default-dest #libdir "LIBS:")
  150.  
  151. (if (> @user-level 0) (message ("You will now be asked a few questions about how you want to install %s.\n\n" @app-name)
  152.                                 "You will be asked to verify your choices before any actions are taken, so that you can correct any errors made."))
  153. (if (askbool
  154.         (prompt ("To use %s, you must have GarshneBlanker installed.\n\nDo you have GarshneBlanker installed?" @app-name))
  155.         (help   "GarshneBlanker is a screensaver system for AmigaOS, you can find it on Aminet as:\n\n"
  156.                 "util/blank/GBlanker#?.lha\n\nWhere #? is the version number and other data.\n\n"
  157.                 "If you don't have it installed, you must click on \"No\" here, which will abort the installation."
  158.                 )
  159.         (default 1)
  160.     )
  161.     (while (= (P_USERQUESTIONS) 0))
  162.     (abort "You can find GarshneBlanker on Aminet in:\n\n"
  163.            "util/blank/GBlanker#?.lha\n\n"
  164.            "You must install it before you can install LotsaBlankers\n\nError occurred")
  165. )
  166.  
  167. ;  Copy da stuff
  168. ; ===============
  169.  
  170. (copyfiles (source "Blankers/")
  171.            (pattern "#?")
  172.            (dest @default-dest)
  173. )
  174.  
  175. (delete (tackon @default-dest "LotsaDistortion"))
  176.  
  177. (if (> #nofpu 0)
  178.     (copyfiles
  179.         (source (tackon @default-dest "LotsaDistortion.FFP"))
  180.         (dest @default-dest)
  181.         (newname "LotsaDistortion")
  182.     )
  183.     (copyfiles
  184.         (source (tackon @default-dest "LotsaDistortion.881"))
  185.         (dest @default-dest)
  186.         (newname "LotsaDistortion")
  187.     )
  188. )
  189.  
  190. (delete (tackon @default-dest "LotsaDistortion.881"))
  191. (delete (tackon @default-dest "LotsaDistortion.FFP"))
  192.  
  193. (if (> #docdir 0)
  194.     (copyfiles (source "LotsaBlankers.guide")
  195.                (dest #docdir)
  196.     )
  197. )
  198.  
  199. (if (> #docicon 0)
  200.     (copyfiles (source "LotsaBlankers.guide.info")
  201.                (dest #docdir)
  202.     )
  203. )
  204.  
  205. (if (> #libdir 0)
  206. (if (<=
  207.         (getversion (tackon #libdir "Garshnelib.library") (resident)) (getversion "libs/Garshnelib.library" (resident)))
  208.         (if (> #libdir 0)
  209.             (copyfiles
  210.                 (source "libs/Garshnelib.library")
  211.                 (dest #libdir)
  212.             )
  213.         )
  214.     (message "Your current version of Garshnelib.library is newer than the replacement, it won't be replaced, sorry.")
  215. )
  216. )
  217.